# coding:utf-8
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('qt4agg')
# 指定默认字体
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
matplotlib.rcParams['font.family'] = ['sans-serif']
# 解决负号'-'显示为方块的问题
matplotlib.rcParams['axes.unicode_minus'] = False

# 创建画板
fig = plt.figure(1)

# 创建画纸
ax1 = plt.subplot(2,1,1)
plt.plot([1,2,3])
ax2 = plt.subplot(2,1,2)
plt.plot([4,5,6])
plt.show()